//
//  LYQEditPositionHeaderView.m
//  ZCProject
//
//  Created by Zheng on 2016/12/26.
//  Copyright © 2016年 Zheng. All rights reserved.
//

#import "LYQEditPositionHeaderView.h"

@implementation LYQEditPositionHeaderView
- (instancetype)init {
    
    self = [super init];
    
    if (self == nil) {
        return nil;
    }
    
    [self addSubview:self.decorationView];
    [self addSubview:self.titleLbl];
    
    [self layoutSubviewsInView];
    
    return self;
}

#pragma mark - headerview layout subviews
- (void)layoutSubviewsInView {
    
    [_decorationView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(kWScale(4));
        make.height.mas_equalTo(kWScale(14));
        make.left.centerY.equalTo(self);
    }];
    
    [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_decorationView.mas_right).offset(kWScale(10));
        make.top.bottom.equalTo(self);
    }];
}

#pragma mark - headerview load subviews
- (UIView *)decorationView {
    if (!_decorationView) {
        _decorationView = [[UIView alloc] init];
        _decorationView.backgroundColor = kLYQBlue;
    }
    return _decorationView;
}

- (UILabel *)titleLbl {
    if (!_titleLbl) {
        _titleLbl = [[UILabel alloc] init];
        _titleLbl.font = kWFont(16);
        _titleLbl.textColor = kLYQBlack;
        _titleLbl.text = @"职位描述 ( 必填 )";
    }
    return _titleLbl;
}



@end
